﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GeneticAlgorithms.Genomes;
using GeneticAlgorithms.Operators.Fitness;
using GeneticAlgorithms.Factories;

namespace GeneticAlgorithms.Populations
{
    /// <summary>
    /// Represents a fixed-size population, composed of
    /// binary genomes.
    /// </summary>
    public class BinaryPopulation : FixedSizePopulation<BinaryGenome, bool>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BinaryPopulation"/> class.
        /// </summary>
        /// <param name="populationSize">Size of the population.</param>
        /// <param name="genomeLength">Length of each genome.</param>
        /// <param name="fitnessProvider">The fitness provider.</param>
        public BinaryPopulation(int populationSize, int genomeLength, IFitnessProvider<BinaryGenome, bool> fitnessProvider)
            : base(populationSize, new BinaryGenomeFactory(genomeLength), fitnessProvider)
        {
        }
    }
}
